<!--
MkDocs version : {{ mkdocs_version }}
Build Date UTC : {{ build_date_utc.strftime('%d %B %Y %H:%M:%S') }}
{% if page and page.meta.revision_date %}Last edit: {{ page.meta.revision_date.strftime('%d %B %Y') }}{% endif %}
-->
<!DOCTYPE html>
<html lang="en">
    <head>
      {%- block site_meta %}
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <meta property="og:image" content="{{ 'images/image-facebook.jpg'|url }}">
        <meta property="og:image:type" content="image/jpeg">
        <meta property="og:image:width" content="1080">
        <meta property="og:image:height" content="1080">

        {% if page and page.is_homepage %}<meta name="description" content="{{ config['site_description'] }}">{% endif %}
        {% if config.site_author %}<meta name="author" content="{{ config.site_author }}">{% endif %}
        {% if page and page.canonical_url %}<link rel="canonical" href="{{ page.canonical_url }}">{% endif %}
        <link rel="shortcut icon" href="{{ 'images/favicon.ico'|url }}">
      {%- endblock %}

      {%- block htmltitle %}
        <title>{% if page and page.title and not page.is_homepage %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
      {%- endblock %}

      {%- block styles %}
        <link href="{{ 'css/bootstrap.min.css'|url }}" rel="stylesheet">
        <link href="{{ 'css/font-awesome.min.css'|url }}" rel="stylesheet">
        <link href="{{ 'css/base.css'|url }}" rel="stylesheet">
        <link rel="apple-touch-icon" href="{{ 'images/apple-touch-icon.png'|url }}">
        {%- if config.theme.highlightjs %}
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ config.theme.hljs_style }}.min.css">
        {%- endif %}
        {%- for path in config['extra_css'] %}
        <link href="{{ path|url }}" rel="stylesheet">
        {%- endfor %}
      {%- endblock %}

      {%- block libs %}
        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->

        <script src="{{ 'js/jquery-3.7.0.min.js'|url }}" defer></script>
        <script src="{{ 'js/bootstrap.min.js'|url }}" defer></script>
        {%- if config.theme.highlightjs %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
        {%- for lang in config.theme.hljs_languages %}
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{lang}}.min.js"></script>
        {%- endfor %}
        <script>hljs.initHighlightingOnLoad();</script>
        {%- endif %}
      {%- endblock %}

      {%- block analytics %}
        {%- if config.google_analytics %}
        <script>
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

            ga('create', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
            ga('send', 'pageview');
        </script>
        {%- endif %}
      {%- endblock %}

      {%- block extrahead %} {% endblock %}

      <script>
        // DARK MODE
        function detectColorScheme(){
          var theme="light";

          if(localStorage.getItem("sumo-docs-theme")){
              if(localStorage.getItem("sumo-docs-theme") == "dark"){
                  var theme = "dark";
              }
          } else if(!window.matchMedia) {
              return false;
          } else if(window.matchMedia("(prefers-color-scheme: dark)").matches) {
              var theme = "dark";
          }

          if (theme=="dark") {
              document.documentElement.setAttribute("data-theme", "dark");
          }
        }
        detectColorScheme();
      </script>

    </head>

    <body{% if page and page.is_homepage %} class="homepage"{% endif %}>

        <div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary text-center">
            <div class="container-fluid">
                <!-- Collapsed navigation -->
                <div class="navbar-header">
                    {%- if nav|length>1 or (page and (page.next_page or page.previous_page)) or config.repo_url %}
                    <!-- Expander button -->
                    <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
                        <span class="navbar-toggler-icon"></span>
                    </button>
                    {%- endif %}
                </div>

                <!-- Expanded navigation -->
                <div id="navbar-collapse" class="navbar-collapse collapse">
                  {%- block site_nav %}
                    {%- if nav|length>1 %}
                        <!-- Main navigation -->
                        <ul class="nav navbar-nav">
                        {%- for nav_item in nav %}
                        {%- if nav_item.children %}
                            <li class="dropdown{% if nav_item.active %} active{% endif %}">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">{{ nav_item.title }} <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                {%- for nav_item in nav_item.children %}
                                    {% include "nav-sub.html" %}
                                {%- endfor %}
                                </ul>
                            </li>
                        {%- else %}
                            <li class="navitem{% if nav_item.active %} active{% endif %}">
                                <a href="{{ nav_item.url|url }}" class="nav-link">{{ nav_item.title }}</a>
                            </li>
                        {%- endif %}
                        {%- endfor %}
                        </ul>
                    {%- endif %}
                  {%- endblock %}

                    <ul class="nav navbar-nav ml-auto">
                      {%- block search_button %}
                        <li class="nav-item">
                            <a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa-solid fa-magnifying-glass"></i> <u>S</u>earch
                            </a>
                        </li>
                      {%- endblock %}

                      {%- block repo %}
                        {%- if page and page.edit_url %}
                            <li class="nav-item">
                                <a rel="edit" href="{{ page.edit_url }}" class="nav-link">
                                    {%- if config.repo_name == 'GitHub' -%}
                                        <i class="fa-brands fa-github"></i> <u>E</u>dit on {{ config.repo_name }}
                                    {%- elif config.repo_name == 'Bitbucket' -%}
                                        <i class="fa-brands fa-bitbucket"></i> <u>E</u>dit on {{ config.repo_name }}
                                    {%- elif config.repo_name == 'GitLab' -%}
                                        <i class="fa fa-gitlab"></i> <u>E</u>dit on {{ config.repo_name }}
                                    {%- else -%}
                                    <u>E</u>dit on {{ config.repo_name }}
                                    {%- endif -%}
                                </a>
                            </li>
                        {%- elif config.repo_url %}
                            <li class="nav-item">
                                <a rel="edit" href="{{ config.repo_url }}" class="nav-link">
                                    {%- if config.repo_name == 'GitHub' -%}
                                        <i class="fa-brands fa-github"></i> {{ config.repo_name }}
                                    {%- elif config.repo_name == 'Bitbucket' -%}
                                        <i class="fa-brands fa-bitbucket"></i> {{ config.repo_name }}
                                    {%- elif config.repo_name == 'GitLab' -%}
                                        <i class="fa-brands fa-gitlab"></i> {{ config.repo_name }}
                                    {%- else -%}
                                    {{ config.repo_name }}
                                    {%- endif -%}
                                </a>
                            </li>
                        {%- endif %}
                      {%- endblock %}
                      <li class="nav-item dropdown">
                          <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
                            More <i class="fa-solid fa-circle-chevron-down"></i>
                          </a>
                          <div class="dropdown-menu dropdown-menu-right">
                            <a class="dropdown-item no-arrow-link" href="https://github.com/eclipse/sumo/issues">Report a Bug / Issue / Typo</a>
                            <a class="dropdown-item" href="{{ 'Editing_Articles.html'|url }}">Help on editing articles</a>
                            <a class="dropdown-item" href="https://github.com/eclipse/sumo/commits/main/docs/web">Recent documentation changes</a>
                            <a class="dropdown-item" href="#" data-toggle="modal" data-target="#mkdocs_keyboard_modal">Keyboard Shortcuts</a>
                            <a class="dropdown-item no-arrow-link" href="https://sumo.dlr.de/sumo_documentation.zip">Download the Documentation</a>
                            <span class="dropdown-item" id="dark-mode-div">Dark mode <label id="theme-switch" class="theme-switch" for="checkbox_theme">
                              <input type="checkbox" id="checkbox_theme">
                          </label></span>
                          </div>
                        </li>
                        <li class="nav-item dropdown">
                          <a class="nav-link dropdown-toggle" href="#" id="languagedrop" data-toggle="dropdown">
                            <i class="fa-solid fa-language"></i> Languages <i class="fa-solid fa-circle-chevron-down"></i>
                          </a>
                          <div class="dropdown-menu dropdown-menu-right">
                            <span class="dropdown-item">
                              Translations are generated automatically by Google Translate:
                            </span>
                            <a class="dropdown-item" href="https://sumo-dlr-de.translate.goog/docs/{{page.url}}?_x_tr_sl=en&_x_tr_tl=de">Deutsch</a>
                            <a class="dropdown-item" href="https://sumo-dlr-de.translate.goog/docs/{{page.url}}?_x_tr_sl=en&_x_tr_tl=es">Español</a>
                            <a class="dropdown-item" href="https://sumo-dlr-de.translate.goog/docs/{{page.url}}?_x_tr_sl=en&_x_tr_tl=fr">Français</a>
                            <a class="dropdown-item" href="https://sumo-dlr-de.translate.goog/docs/{{page.url}}?_x_tr_sl=en&_x_tr_tl=it">Italiano</a>
                            <a class="dropdown-item" href="https://sumo-dlr-de.translate.goog/docs/{{page.url}}?_x_tr_sl=en&_x_tr_tl=hu">Magyar</a>
                            <a class="dropdown-item" href="https://sumo-dlr-de.translate.goog/docs/{{page.url}}?_x_tr_sl=en&_x_tr_tl=tr">Türkçe</a>
                          </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container-fluid">
          <div class="row">
            {%- block content %}
                <div class="col-md-3">
                  <div class="text-center"><a href="{{ 'index.html'|url }}" style="display: inline-block; margin-top: 5px;"><img src="{{'images/sumo-logo.png'|url}}" class="sumoLogo" alt="SUMO Logo" width="120px"></a></div>
                  {% include "toc.html" %}
                </div>
                <div class="col-md-9 main-area" role="main">
                  {% if page and not (page.is_top_level and page.is_index and page.file.url == "index.html") %} <!-- page.is_homepage seems to be broken in Mkdocs > 1.1.0 -->
                  {% include "breadcrumbs.html" %}
                  <hTitles>{{page.title}}<hr style="border: 0.5px solid #338033; margin-top: 5px !important;"></hTitles>
                  {% endif %}
                  {% include "content.html" %}
                </div>
            {%- endblock %}
          </div>
          <button onclick="goTopFunction()" id="goToTop" title="Go to top"><i class="fa-solid fa-arrow-up"></i></button>
        </div>

        <footer class="col-md-12">
        {%- block footer %}
          {% if page and page.meta.revision_date %}
            <br><small><i>This page was last edited on: {{ page.meta.revision_date.strftime('%d %B %Y') }}</i></small>
          {% endif %}
          <hr>
          {%- if config.copyright %}
            <p>{{ config.copyright }}</p>
          {%- endif %}
          <p>Follow us on <a class="no-arrow-link" href="https://www.twitter.com/eclipsesumo/"><i class="fa-brands fa-x-twitter"></i></a> <a class="no-arrow-link" href="https://www.facebook.com/simulationofurbanmobility/"><i class="fa-brands fa-facebook"></i></a> <a class="no-arrow-link" href="https://www.instagram.com/eclipse.sumo/"><i class="fa-brands fa-instagram"></i></a>
          | Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a></p>
        {%- endblock %}
        </footer>

      {%- block scripts %}

      {% include "search_modal.html" %}
      <script>
        window.onscroll = function() {scrollFunction()};

        function scrollFunction() {
          if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
            document.getElementById("goToTop").style.display = "block";
          } else {
            document.getElementById("goToTop").style.display = "none";
          }
        }

        function goTopFunction() {
          document.body.scrollTop = 0;
          document.documentElement.scrollTop = 0;
        }

        var base_url = {{ base_url | tojson }},
            shortcuts = {{ config.theme.shortcuts | tojson }};
        </script>
        <script src="{{ 'js/base.js'|url }}" defer></script>
        {%- for path in config['extra_javascript'] %}
        <script src="{{ path|url }}" defer></script>
        {%- endfor %}

        <script>
          const toggleSwitch = document.querySelector('#theme-switch input[type="checkbox"]');

          function switchTheme(e) {
              if (e.target.checked) {
                  localStorage.setItem('sumo-docs-theme', 'dark');
                  document.documentElement.setAttribute('data-theme', 'dark');
                  toggleSwitch.checked = true;
              } else {
                  localStorage.setItem('sumo-docs-theme', 'light');
                  document.documentElement.setAttribute('data-theme', 'light');
                  toggleSwitch.checked = false;
              }
          }

          toggleSwitch.addEventListener('change', switchTheme, false);

          if (document.documentElement.getAttribute("data-theme") == "dark"){
              toggleSwitch.checked = true;
          }
          </script>
      {%- endblock %}

      {% if 'search' in config['plugins'] %}{%- include "search-modal.html" %}{% endif %}
      {%- include "keyboard-modal.html" %}
    </body>
</html>
